# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
# Contributor: Philippe Proulx <eeppeliteloop@gmail.com>
_pkgname=barectf
pkgname=python-barectf
pkgver=3.1.1
pkgrel=3
pkgdesc='Generator of ANSI C tracers which output CTF'
arch=('any')
url='http://barectf.org'
license=('MIT')
depends=('python-termcolor' 'python-yaml' 'python-jsonschema' 'python-jinja' 'python-setuptools')
makedepends=('python-poetry-core' 'python-build' 'python-installer' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://github.com/efficios/barectf/archive/v$pkgver.tar.gz")
sha256sums=('42b93222ee12dc25b012a374c40020f5817e0e71c50118814a956737297195d7')

build() {
    cd "$_pkgname-$pkgver"
    python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
